home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Human Interface Toolbox / Concordia / Concordia.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.8 KB  |  99 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        Concordia.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by:     
  7.  
  8.     Copyright:    Copyright © 1991-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/10/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #ifndef _concordia_
  24. #define _concordia_
  25. /******************************************************************************\
  26. * Header Files
  27. \******************************************************************************/
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32.  
  33.  
  34. /******************************************************************************\
  35. * Constants and Macros
  36. \******************************************************************************/
  37.  
  38. #define null         0             //Generic null
  39. #define cmmdCharCode ((char) 0x11) //ASCII code of command character
  40.  
  41. /* Find length of a Pascal string in bytes */
  42. #define strSize(StrPtr) ((int)StrPtr[0]+1)
  43.  
  44. /* System Globals */
  45. #define sgTopMenuItem  *((short *) 0x0A0A)
  46. #define sgAtMenuBottom *((short *) 0x0A0C)
  47. #define sgMBSaveLoc   *((Handle *) 0xB5C) //I guess MBDF 0 stores a handle here
  48.  
  49.  
  50. /******************************************************************************\
  51. * Type Declarations
  52. \******************************************************************************/
  53.  
  54. typedef struct
  55.     {
  56.     char    privates [76];
  57.     long    randSeed;
  58.     BitMap  screenBits;
  59.     Cursor  arrow;
  60.     Pattern dkGray;
  61.     Pattern ltGray;
  62.     Pattern gray;
  63.     Pattern black;
  64.     Pattern white;
  65.     GrafPtr thePort;
  66.     } QDGlobal;
  67.  
  68. /* Pointer to Quickdraw Globals */
  69. #define qdGlobPtr ((QDGlobal *) (**((GrafPtr ***) CurrentA5) + 1) - 1)
  70.  
  71. /* Text state */
  72. typedef struct
  73.     {
  74.     short txFace;  //Typeface
  75.     Style txStyle; //Typestyle
  76.     short txMode;  //How is text drawn?
  77.     short txSize;  //Typesize
  78.     } TextStateRec;
  79.  
  80. /* Menu information for one menu item (except for item string) */
  81. typedef struct
  82.     {
  83.     Byte  iconNum;   //Icon resource ID
  84.     char  kbdEquiv;  //Keyboard menu equivalent
  85.     char  markChar;  //Character mark
  86.     Style charStyle; //Item's character style
  87.     } ItemInfoRec, *ItemInfoPtr;
  88.  
  89.  
  90. /******************************************************************************\
  91. * Function Prototypes
  92. \******************************************************************************/
  93.  
  94. void GetTextState (TextStateRec *);
  95. void SetTextState (TextStateRec *);
  96.  
  97.  
  98. #endif
  99.